/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cadi.aux;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

/**
 *
 * @author Luis Eduardo Garay
 */
public class Coin extends JLabel {

    private String size;

    public void changeIcon(int value) {
        if(size.equals("large")){
            switch(value){
                case 0:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/50centavos-big.png")));
                    break;
                case 1:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/1peso-big.png")));
                    break;
                case 2:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/2pesos-big.png")));
                    break;
                case 5:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/5pesos-big.png")));
                    break;
                case 10:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/10pesos-big.png")));
                    break;
                case 20:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete20_big.jpeg")));
                    break;
                case 50:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete50_big.jpg")));
                    break;
                case 100:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete100_big.jpg")));
                    break;
                case 200:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete200_big.jpg")));
                    break;
                case 500:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete500_big.jpeg")));
                    break;
            }
        }else if(size.equals("small")){
            switch(value){
                case 0:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/50centavos-small.png")));
                    break;
                case 1:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/1peso-small.png")));
                    break;
                case 2:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/2pesos-small.png")));
                    break;
                case 5:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/5pesos-small.png")));
                    break;
                case 10:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/10pesos-small.png")));
                    break;
                case 20:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete20_small.jpeg")));
                    break;
                case 50:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete50_small.jpg")));
                    break;
                case 100:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete100_small.jpg")));
                    break;
                case 200:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete200_small.jpg")));
                    break;
                case 500:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete500_small.jpeg")));
                    break;
            }
        }
    }
    
    
    
    public Coin(int value, String size){
        this.size = size;
        if(size.equals("large")){
            switch(value){
                case 0:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/50centavos-big.png")));
                    break;
                case 1:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/1peso-big.png")));
                    break;
                case 2:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/2pesos-big.png")));
                    break;
                case 5:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/5pesos-big.png")));
                    break;
                case 10:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/10pesos-big.png")));
                    break;
                case 20:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete20_big.jpeg")));
                    break;
                case 50:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete50_big.jpg")));
                    break;
                case 100:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete100_big.jpg")));
                    break;
                case 200:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete200_big.jpg")));
                    break;
                case 500:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete500_big.jpeg")));
                    break;
            }
        }else if(size.equals("small")){
            switch(value){
                case 0:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/50centavos-small.png")));
                    break;
                case 1:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/1peso-small.png")));
                    break;
                case 2:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/2pesos-small.png")));
                    break;
                case 5:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/5pesos-small.png")));
                    break;
                case 10:

                    this.setIcon(new ImageIcon(getClass().getResource("/resources/10pesos-small.png")));
                    break;
                case 20:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete20_small.jpeg")));
                    break;
                case 50:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete50_small.jpg")));
                    break;
                case 100:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete100_small.jpg")));
                    break;
                case 200:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete200_small.jpg")));
                    break;
                case 500:
                    this.setIcon(new ImageIcon(getClass().getResource("/resources/billete500_small.jpeg")));
                    break;
            }
        }
    }
    
}
